package sk.velkavrana.app;

import sk.velkavrana.app.context.Context;
import sk.velkavrana.app.model.ConnectionInfo;
import sk.velkavrana.app.ui.JMainAppPanel;
import sk.velkavrana.app.util.UIUtil;
import sk.velkavrana.notSynchronized.model.ConnectionInfoHelper;

import javax.swing.*;
import java.awt.*;

/**
 * @author mtymes
 * @since May 25, 2009 1:21:57 AM
 */
public class DBCarrierApp {
    public static void main(String[] args) {
//        Context.getInstance().setConnectionInfoEx(new ConnectionInfo(ConnectionInfoHelper.get("oracle")));
//        Context.getInstance().setConnectionInfoEx(new ConnectionInfo(ConnectionInfoHelper.get("informix")));
//        Context.getInstance().setConnectionInfoEx(new ConnectionInfo(ConnectionInfoHelper.get("teradata")));
//        Context.getInstance().setConnectionInfoEx(new ConnectionInfo(ConnectionInfoHelper.get("h2-test")));
//        Context.getInstance().setConnectionInfoEx(new ConnectionInfo(ConnectionInfoHelper.get("mssql")));
        Context.getInstance().setConnectionInfoEx(new ConnectionInfo(ConnectionInfoHelper.get("h2-AFE")));

        UIUtil.initUI();

        JFrame frame = UIUtil.createFrame("DBCarrier " + Context.VERSION + " by Matej Tymes", 400, 300);

        Container content = frame.getContentPane();

        content.add(new JMainAppPanel());

        frame.pack();

        UIUtil.center(frame);

        UIUtil.show(frame);
    }
}
